/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



import javax.microedition.lcdui.*;

/**
 * @author Administrator
 */
public class Splash extends Canvas {
    private Image splashImg = null;
   //private Player bismillahSound = null;
    protected void paint(Graphics g) {
        setFullScreenMode(true);
                try {
                    if(splashImg==null)
                        splashImg = Image.createImage("/splash.png");
		} catch (Exception e) {
                        //e.printStackTrace();
			System.out.println("Can't load Splash screen image pret"+e.getMessage());
		}

		g.setColor(0x0);
//		g1.setColor(0x000D73);
		g.fillRect(0, 0, getWidth(), getHeight());
		if(splashImg!=null){
			g.drawImage(splashImg, 0, 0, Graphics.TOP|Graphics.LEFT);
                    //g.drawImage(splashImg, getWidth()/2, getHeight()/2, Graphics.VCENTER|Graphics.HCENTER);
		}
                
                
                /*
                try {
                    InputStream in = getClass().getResourceAsStream("/bismi.wav");
                    bismillahSound = Manager.createPlayer(in, "audio/x-wav");
                    bismillahSound.start();
                } catch (Exception e) {
                    e.printStackTrace();
                    System.err.println(e);
                }
                 */
                repaint();
    }
}
